const path = require("path");

const resolve = (dir) => path.join(__dirname, dir);

module.exports = {
  transpileDependencies: ["@dcloudio/uni-ui"],
  configureWebpack: {
    resolve: {
      alias: {
        "@": resolve("src"),
      },
    },
  },
  devServer: {
    port: 4000,
    https: false,
    client: {
      overlay: false,
    },
    proxy: {
      "/api": {
        target: "http://localhost:9000",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
};
